package com.yny;


import com.ynny.Beans.dash;
import com.ynny.Dao.dashDao;
import org.junit.Test;
import org.junit.internal.runners.JUnit38ClassRunner;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:dash.xml"})
public class dashTest {

    @Autowired
    private dashDao dashDao;

    @Test
    public void test() {
        dashDao.insert("003", "和我", "大一", "计算机002", "男");
//        dashDao.insert("001", "方法", "大二", "计算机003", "男");
//        dashDao.insert("002", "分隔符", "大三", "计算机004", "女");

        System.out.println(dashDao.FindAll());
        System.out.println(dashDao.FindByNumber("001"));
    }
}
